﻿using IcsSEMCtrl.Event.Device;
using System;

namespace TKT.Lifter.CIM.Lifter.Event.Lifter
{
    [Serializable]
    public class FanSenderEvent : DeviceEvent
    {

        private string _FanownerId;
        private bool _State;
        private bool _isrpmOrState;
        private short RPM; //风机转速
        public static readonly string CLASS = "FanSenderEvent";
        public static readonly string SPECIFIC_SUBJECT = "FanSender";
        public new static readonly string SUBJECT = DeviceEvent.SUBJECT + "." + FanSenderEvent.SPECIFIC_SUBJECT;
        public FanSenderEvent(string deviceId, string deviceType, String ownId, bool value, bool isStatus) : base(deviceId, deviceType)
        {
            this.OwnerID = ownId;
            this.State = value;
            this.IsrpmOrState = isStatus;
        }
        public FanSenderEvent(string deviceId, string deviceType, String ownId, short value, bool isStatus) : base(deviceId, deviceType)
        {
            this.OwnerID = ownId;
            this.RPM1 = value;
            this.IsrpmOrState = isStatus;
        }
        public new static string FormSubject(string id)
        {
            return FanSenderEvent.SUBJECT + "." + id;
        }
        public string OwnerID { get => _FanownerId; set => _FanownerId = value; }
        public bool State { get => _State; set => _State = value; }
        public bool IsrpmOrState { get => _isrpmOrState; set => _isrpmOrState = value; }
        public short RPM1 { get => RPM; set => RPM = value; }
    }
}
